package com.example.loginlog.exception;

import lombok.Data;

/**
 * 〈一句话功能简述〉<br> 
 * 〈〉
 * @author  SongPeng
 * @date  2021/10/19 14:30
 * @version 1.0
 */

@Data
public class ServiceException  extends RuntimeException{
    private static final long serialVersionUID = 1L;
    /**
     * 错误码
     */
    protected int errorCode;
    /**
     * 错误信息
     */
    protected String errorMsg;
    public ServiceException() {
        super();
    }
    public ServiceException(String message) {
        super(message);
        this.errorMsg=message;
    }



    public ServiceException(com.example.loginlog.exception.BaseCodeInterface errorInfoInterface) {
        this.errorCode = errorInfoInterface.getResultCode();
        this.errorMsg = errorInfoInterface.getResultMsg();
    }

    public ServiceException(com.example.loginlog.exception.BaseCodeInterface errorInfoInterface, String message) {
        this.errorCode = errorInfoInterface.getResultCode();
        this.errorMsg = message;
    }


}
